##############################################################
## MOD Titulo:         eCard MOD
## MOD Autor:          MagMo < N/A > (N/A) http://phpbb.mwegner.de/
## MOD Tradutor:       reef_01 < http://www.piratesdelcaribe.com.ar/foro/index.php >
## MOD Descripcion:     ES:
##                        Aade una funcin eCard a su phpBB2.
##                      EN:
##                        Adds an eCard-Function to your phpBB2.
##                      DE:
##                        Fgt eine eCard-Funktion zum phpBB2-Forum hinzu.
##
## MOD Version:         0.2.1
##
## Instalacion Level:  Intermedio
## Instalacion Time:   20 Minutos
##
## Archivos a editar:       10
##      viewonline.php
##      admin/index.php
##      includes/constants.php
##      includes/page_header.php
##      includes/usercp_viewprofile.php
##      language/lang_spanish/lang_main.php
##      language/lang_english/lang_main.php
##      language/lang_german/lang_main.php
##      templates/subSilver/overall_header.tpl
##      templates/subSilver/profile_view_body.tpl
##
## Archivos Incluidos:      38
##      ecard_db_update.php
##      ecard.php
##      admin/admin_ecard_cat.php
##      admin/admin_ecard_ec.php
##      admin/admin_ecard_img.php
##      admin/admin_ecard_stat.php
##      admin/admin_ecard_upload.php
##      images/ecard/stamp.jpg
##      images/ecard/gallery/no_image.jpg
##      includes/ecard_config.php
##      includes/ecard_read.php
##      includes/ecard_select.php
##      includes/ecard_send.php
##      includes/ecard_vali.php
##      includes/ecard_write.php
##      language/lang_spanish/lang_ecard.php
##      language/lang_spanish/email/ecard_send.tpl
##      language/lang_spanish/email/ecard_notification.tpl
##      language/lang_english/lang_ecard.php
##      language/lang_english/email/ecard_send.tpl
##      language/lang_english/email/ecard_notification.tpl
##      language/lang_german/lang_ecard.php
##      language/lang_german/email/ecard_send.tpl
##      language/lang_german/email/ecard_notification.tpl
##      templates/subSilver/ecard_gallery.tpl
##      templates/subSilver/ecard_view.tpl
##      templates/subSilver/ecard_write.tpl
##      templates/subSilver/admin/ecard_cat_body.tpl
##      templates/subSilver/admin/ecard_cat_delete_body.tpl
##      templates/subSilver/admin/ecard_cat_edit_body.tpl
##      templates/subSilver/admin/ecard_ec_body.tpl
##      templates/subSilver/admin/ecard_img_body.tpl
##      templates/subSilver/admin/ecard_img_delete_body.tpl
##      templates/subSilver/admin/ecard_img_edit_body.tpl
##      templates/subSilver/admin/ecard_img_list.tpl
##      templates/subSilver/admin/ecard_stat_body.tpl
##      templates/subSilver/admin/ecard_upload_body.tpl
##      templates/subSilver/images/icon_mini_ecard.gif
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
##
## Author Notes: 
##
## SQL commands
## ------------
## This MOD need a database update.
## Please copying the db_update.php in your phpBB root directory, 
## run it with your navigator, and then delete it from the phpBB 
## root directory.
##
## Please, do it NOW! Before editing phpBB files by EM or manually!!!
## Otherwise, you may have an error message during your next
## connection.
##
############################################################## 
## MOD History: 
##
##   2006-04-04 - Version 0.2.1
##	- Registrierte Mitglieder knnen sich nun auch untereinander eCards zuschicken.
##
##   2006-01-13 - Version 0.2.0a
##	- ein paar kleinere Fehler in der Installationsanleitung behoben (Dank an gloriosa)
##	- der Mod an sich ist mit der Version 0.2.0 identisch
##
##   2006-01-09 - Version 0.2.0
##	- Bilder-Upload ber den ACP
##	- eCard-Statistik
##	- eCards knnen in verschiedene Rubriken aufgeteilt werden
##      - wird ein eCard Bild entfernt und danach eine eCard mit diesem Bild aufgerufen, dann tritt ein Fehler auf > behoben
##	- die 'eCard gelesen'-Besttigungsmail geht an einen falschen Empfnger > behoben
##
##   2006-01-04 - Version 0.1.1
##      - vor dem Nav-Link wird ein falsches Mini-Icon angezeigt > behoben
##	- beim Schreiben der eCard wird auf Grund eines Fehlers kein Bild angezeigt > behoben
##
##   2006-01-02 - Version 0.1.0
##      - Initial Release
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ DIY INSTRUCTIONS ]--------------------------------------
#
Crear folder: images/ecard
Crear folder: images/ecard/gallery

# Require permisos CHMOD 777 images/ecard/gallery

# 
#-----[ COPIAR ]------------------------------------------------ 
#

copy db_update.php to db_update.php 
copy root/ecard.php to ecard.php 
copy root/admin/admin_ecard_cat.php to admin/admin_ecard_cat.php 
copy root/admin/admin_ecard_ec.php to admin/admin_ecard_ec.php 
copy root/admin/admin_ecard_img.php to admin/admin_ecard_img.php 
copy root/admin/admin_ecard_stat.php to admin/admin_ecard_stat.php 
copy root/admin/admin_ecard_upload.php to admin/admin_ecard_upload.php 
copy root/images/ecard/stamp.jpg to images/ecard/stamp.jpg 
copy root/images/ecard/gallery/no_image.jpg to images/ecard/gallery/no_image.jpg 
copy root/includes/ecard_config.php to includes/ecard_config.php 
copy root/includes/ecard_read.php to includes/ecard_read.php 
copy root/includes/ecard_select.php to includes/ecard_select.php 
copy root/includes/ecard_send.php to includes/ecard_send.php 
copy root/includes/ecard_vali.php to includes/ecard_vali.php 
copy root/includes/ecard_write.php to includes/ecard_write.php 
copy root/language/lang_spanish/lang_ecard.php to language/lang_spanish/lang_ecard.php 
copy root/language/lang_spanish/email/ecard_send.tpl to language/lang_spanish/email/ecard_send.tpl 
copy root/language/lang_spanish/email/ecard_notification.tpl to language/lang_spanish/email/ecard_notification.tpl
copy root/language/lang_english/lang_ecard.php to language/lang_english/lang_ecard.php 
copy root/language/lang_english/email/ecard_send.tpl to language/lang_english/email/ecard_send.tpl 
copy root/language/lang_english/email/ecard_notification.tpl to language/lang_english/email/ecard_notification.tpl 
copy root/language/lang_german/lang_ecard.php to language/lang_german/lang_ecard.php 
copy root/language/lang_german/email/ecard_send.tpl to language/lang_german/email/ecard_send.tpl 
copy root/language/lang_german/email/ecard_notification.tpl to language/lang_german/email/ecard_notification.tpl 
copy root/templates/subSilver/ecard_gallery.tpl to templates/subSilver/ecard_gallery.tpl 
copy root/templates/subSilver/ecard_view.tpl to templates/subSilver/ecard_view.tpl 
copy root/templates/subSilver/ecard_write.tpl to templates/subSilver/ecard_write.tpl 
copy root/templates/subSilver/admin/ecard_cat_body.tpl to templates/subSilver/admin/ecard_cat_body.tpl 
copy root/templates/subSilver/admin/ecard_cat_delete_body.tpl to templates/subSilver/admin/ecard_cat_delete_body.tpl 
copy root/templates/subSilver/admin/ecard_cat_edit_body.tpl to templates/subSilver/admin/ecard_cat_edit_body.tpl 
copy root/templates/subSilver/admin/ecard_ec_body.tpl to templates/subSilver/admin/ecard_ec_body.tpl 
copy root/templates/subSilver/admin/ecard_img_body.tpl to templates/subSilver/admin/ecard_img_body.tpl 
copy root/templates/subSilver/admin/ecard_img_delete_body.tpl to templates/subSilver/admin/ecard_img_delete_body.tpl 
copy root/templates/subSilver/admin/ecard_img_edit_body.tpl to templates/subSilver/admin/ecard_img_edit_body.tpl 
copy root/templates/subSilver/admin/ecard_img_list.tpl to templates/subSilver/admin/ecard_img_list.tpl 
copy root/templates/subSilver/admin/ecard_stat_body.tpl to templates/subSilver/admin/ecard_stat_body.tpl 
copy root/templates/subSilver/admin/ecard_upload_body.tpl to templates/subSilver/admin/ecard_upload_body.tpl 
copy root/templates/subSilver/images/icon_mini_ecard.gif to templates/subSilver/images/icon_mini_ecard.gif 

#
#-----[ DIY INSTRUCCIONES ]--------------------------------------
#

ES:
 EJECUTAR EL ARCHIVO db_update.php DE LA RAIZ DEL FORO (el directorio principal de su foro) Y ELIMINELO DESPUS DE ESTO!!!
 Ejemplo: http: // www.domain.com/phpbb2/ecard_db_update.php

EN:
 RUN THE FILE db_update.php FROM THE FORUMROOT (main-directory of your forum) AND DELETE IT AFTER THAT !!!
 Example: http://www.domain.com/phpbb2/ecard_db_update.php

DE:
 FHRE DIE DATEI db_update.php AUS DEM FORUMROOT (Hauptverzeichnis Deines Forums) AUS UND LSCHE SIE DANACH !!!
 Beispiel: http://www.domain.de/phpbb2/ecard_db_update.php

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
viewonline.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
				default:
					$location = $lang['Forum_index'];
					$location_url = "index.$phpEx";

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
				// eCard Mod - Start
	 			case PAGE_ECARD:
					$location = $lang['Viewing_ECard'];
					$location_url = "ecard.$phpEx";
					break;
				// eCard Mod - End

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
admin/index.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
						default:
							$location = $lang['Forum_index'];
							$location_url = "index.$phpEx?pane=right";

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
						// eCard Mod - Start
			 			case PAGE_ECARD:
							$location = $lang['Viewing_ECard'];
							$location_url = "ecard.$phpEx";
							break;
						// eCard Mod - End

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
					default:
						$location = $lang['Forum_index'];
						$location_url = "index.$phpEx?pane=right";

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
					// eCard Mod - Start
		 			case PAGE_ECARD:
						$location = $lang['Viewing_ECard'];
						$location_url = "ecard.$phpEx";
						break;
					// eCard Mod - End

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
includes/constants.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
define('PAGE_TOPIC_OFFSET', 5000);

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
// eCard Mod - Start
define('PAGE_ECARD', -19);
// eCard Mod - End

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');

# 
#-----[ DESPUS, AADIR ]------------------------------------------------ 
# 
// eCard Mod - Start
define('ECARD_TABLE', $table_prefix.'ecard');
define('ECARD_CATEGORIES_TABLE', $table_prefix.'ecard_categories');
define('ECARD_IMAGES_TABLE', $table_prefix.'ecard_images');
// eCard Mod - End

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
includes/page_header.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
	'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
	// eCard Mod - Start
	'L_ECARD' => $lang['Viewing_ECard'], 
	'U_ECARD' => append_sid('ecard.'.$phpEx),
	// eCard Mod - End


# 
#-----[ ABRIR ]------------------------------------------------ 
# 
includes/usercp_viewprofile.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '&nbsp;';
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website'] . '</a>' : '&nbsp;';

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
// eCard Mod - Start
if ( $userdata['user_level'] == ADMIN )
{
	$template->assign_block_vars('switch_user_is_administrator', array());
}
// eCard Mod - End

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
	'YIM' => $yim,

# 
#-----[ DESPUS, AADIR ]------------------------------------------------ 
# 
	// eCard Mod - Start
	'L_ECARDS_SENT' => $lang['eCards_sent'],
	'ECARDS_SENT' => $profiledata['ecard_counter'],
	// eCard Mod - End

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
language/lang_spanish/lang_main.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
?>

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
// eCard Mod - Start
$lang['Viewing_ECard'] = 'eCard';
$lang['eCards_sent'] = 'Enviar eCards';
$lang['ec_eCards'] = 'eCards';
$lang['ec_Categories'] = 'Categorias';
$lang['ec_Images'] = 'Imgenes';
$lang['ec_Upload'] = 'Upload';
$lang['ec_xStatistic'] = 'Estatisticas';
// eCard Mod - End


# 
#-----[ ABRIR ]------------------------------------------------ 
# 
language/lang_english/lang_main.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
?>

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
// eCard Mod - Start
$lang['Viewing_ECard'] = 'eCard';
$lang['eCards_sent'] = 'sent eCards';
$lang['ec_eCards'] = 'eCards';
$lang['ec_Categories'] = 'Categories';
$lang['ec_Images'] = 'Images';
$lang['ec_Upload'] = 'Upload';
$lang['ec_xStatistic'] = 'Statistics';
// eCard Mod - End

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
language/lang_german/lang_main.php

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
?>

# 
#-----[ ANTES, AADIR ]------------------------------------------------ 
# 
// eCard Mod - Start
$lang['Viewing_ECard'] = 'eCard';
$lang['eCards_sent'] = 'Gesendete eCards';
$lang['ec_eCards'] = 'eCards';
$lang['ec_Categories'] = 'Kategorien';
$lang['ec_Images'] = 'Bilder';
$lang['ec_Upload'] = 'Upload';
$lang['ec_xStatistic'] = 'Statistik';
// eCard Mod - End

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
templates/subSilver/overall_header.tpl

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp; 

# 
#-----[ EN-LINEA BUSCAR ]------------------------------------------------ 
# 
/>{L_USERGROUPS}</a>&nbsp;

# 
#-----[ EN-LINEA DESPUS, AADIR ]------------------------------------------------ 
# 
 &nbsp;<a href="{U_ECARD}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_ecard.gif" width="11" height="13" border="0" alt="{L_ECARD}" hspace="3" />{L_ECARD}</a>&nbsp;

# 
#-----[ ABRIR ]------------------------------------------------ 
# 
templates/subSilver/profile_view_body.tpl

# 
#-----[ BUSCAR ]------------------------------------------------ 
# 
		  <td valign="top"><b><span class="gen">{POSTS}</span></b><br /><span class="genmed">[{POST_PERCENT_STATS} / {POST_DAY_STATS}]</span> <br /><span class="genmed"><a href="{U_SEARCH_USER}" class="genmed">{L_SEARCH_USER_POSTS}</a></span></td>
		</tr>

# 
#-----[ DESPUS, AADIR ]------------------------------------------------ 
# 
		<!-- Start add - eCard MOD -->
		<!-- BEGIN switch_user_is_administrator -->
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_ECARDS_SENT}:&nbsp;</span></td>
		  <td valign="top"><b><span class="gen">{ECARDS_SENT}</span></td>
		</tr>
		<!-- END switch_user_is_administrator -->
		<!-- End add - eCard MOD -->

# 
#-----[ GUARDAR/CERRAR TODOS LOS ARCHIVOS ]-------------------------------- 
# 
# EoM